package com.doublechaintech.retailscm.iamservice;

import com.doublechaintech.retailscm.RetailscmUserContext;

public interface BusinessHandler {

  void onAuthenticationFailed(
      RetailscmUserContext userContext,
      LoginContext loginContext,
      LoginResult loginResult,
      IdentificationHandler idHandler,
      BusinessHandler bizHandler)
      throws Exception;

  void onAuthenticateNewUserLogged(
      RetailscmUserContext userContext,
      LoginContext loginContext,
      LoginResult loginResult,
      IdentificationHandler idHandler,
      BusinessHandler bizHandler)
      throws Exception;

  void onAuthenticateUserLogged(
      RetailscmUserContext userContext,
      LoginContext loginContext,
      LoginResult loginResult,
      IdentificationHandler idHandler,
      BusinessHandler bizHandler)
      throws Exception;

  default Object onLogout(RetailscmUserContext userContext, BusinessHandler bizHandler)
      throws Exception {
    return null;
  }
}
